# p = lambda x: (x * (3 * x - 1)) // 2
#
# res = 1
# # 假设Pj > Pk
# k = 1
# j = k + 1
# while True:
#     print(p(res))
#     if p(j) - p(k) > p(res) and j == k + 1:  # 表示这个res已经不可能了
#         res += 1
#     elif p(j) - p(k) > p(res) and j != k + 1:
#         k += 1
#         j = k + 1
#     elif p(j) - p(k) < p(res):  # 尝试下一个
#         j += 1
#     else:  # 验证相加是不是Pentagonal
#         for i in range(j, j + k):
#             if p(j) + p(k) == p(i):
#                 print(p(res))
#                 exit(0)
#         j += 1

s = set(i * (3 * i - 1) // 2 for i in range(1, 3000))

for i in s:
    for j in s:
        if i < j:
            continue
        if i + j in s and i + 2 * j in s:
            print(f'{i + j}-{j}={i}')
